<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}">
</head>
<style type="text/css">
    html{
        background-color: #ffffff;
    }
</style>
<body>
<form class="layui-form myData layui-form-pane" lay-filter="stuform" style="text-align: center;padding-top: 5%;">
    <input type="hidden" name="id" data-th-value="${model.id}"/>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">书名：</label>
            <div class="layui-input-inline">
                <select name="bookId">
                    <option></option>
                    <option th:each="t:${bookInformation}" th:value="${t.id}"
                            th:selected="${model.bookName==null? null: model.bookName==t.bookName}"
                            th:text="${t.bookName}">书名
                    </option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">数量：</label>
            <div class="layui-input-inline">
                <input type="text" name="quantity" lay-verify="required" required autocomplete="off"
                       th:value="${model.quantity}" class="layui-input" placeholder="请输入图书数量"/>
            </div>
        </div>
    </div>
</form>
<script th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript">
    layui.config({
        base: '../../static/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use("form", function () {
        var form = layui.form;
        form.render();

    });
</script>
</body>
</html>